package cn.edkuir.product.feign.fallback;

import cn.edkuir.common.exception.BizCodeEnum;
import cn.edkuir.common.utils.R;
import cn.edkuir.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 熔断降级
 */
@Component
@Slf4j
public class SeckillFeignServiceFallback implements SeckillFeignService {
    @Override
    public R getSeckillSkuInfo(Long skuId) {
        log.info("getSeckillSkuInfo 熔断方法调用");
        return R.error(BizCodeEnum.TOO_MANY_REQUEST.getCode(), BizCodeEnum.TOO_MANY_REQUEST.getMessage());
    }
}
